/*************************************************************************
 * @file: ipoint.h
 * @date: 01/04/2012
 * TOPOL v1_0 - (c)copyright 2012 TEC/UFF
 *************************************************************************
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 ************************************************************************/

#ifndef _POINT
#define _POINT

// includes
//----------

// forward declarations
//----------------------

/*!
 * CLASS
 * IPoint
 * 
 * This class implements the requirement for the geometrical entity named
 * Point and sets all the necessary informations
 * 
 * @author Andre Pereira (andremaues@id.uff.br)
 * @version 1.0.0
 */
class IPoint
{

public:

  ////////////////////////////////////////////////
  ///  Constructor and Destructor Declaration  ///
  ////////////////////////////////////////////////

  /**
   * @brief Constructs a point
   */
	IPoint();

  /**
   * @brief Constructs a point with given coordinates
   * @param _x is the first coordinate
   * @param _y is the second coordinate
   * @param _z is the third coordinate
   */
  IPoint( double _x, double _y, double _z );

  ////////////////////////////////////
  ///  PUBLIC Methods Declaration  ///
  ////////////////////////////////////

  /**
   * @brief Computes the square distance to another point with given coordinates
   * @param _x is the first coordinate of the other point
   * @param _y is the second coordinate of the other point
   * @param _z is the third coordinate of the other point
   * @return double is the square distance to the other point
   */
  double distance2( double _x, double _y, double _z );

  /**
   * @brief Computes the square distance to another point
   * @param _p is the other point
   * @return double is the square distance to the other point
   */
  double distance2( IPoint _p );

  /**
   * @brief Gets the X coordinate of the point
   * @return double is the X coordinate of current point
   */
  double getX();

  /**
   * @brief Gets the Y coordinate of the point
   * @return double is the Y coordinate of current point
   */
  double getY();

  /**
   * @brief Gets the Z coordinate of the point
   * @return double is the Z coordinate of current point
   */
  double getZ();


private:

  ////////////////////////////////
  ///  Attributes Declaration  ///
  ////////////////////////////////

  /** @brief Coordinate X of the point */
	double m_x;

  /** @brief Coordinate Y of the point */
	double m_y;

  /** @brief Coordinate Z of the point */
	double m_z;

};

#endif
